﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 观测者模式_解耦实践1
{
    class Secretary
    {
        IList<Observer> List = new List<Observer>();

        public void Append(Observer o)
        {
            List.Add(o);
        }

        public void Notify()
        {
            foreach (Observer o in List)
            {
                o.Update();
            }
        }

        string _action = string.Empty;
        
        public string SecretaryAction
        {
            get { return _action; }
            set { _action = value; }
        }
    }
}
